<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>

        <style>
            *{
                padding: 0px;
                margin: 0px;
            }



            .dvtime{
                width: 50%;
                height: 60px;
                line-height: 60px;
                background-color: #7cd3b1;
                margin: 0px auto;
                margin-bottom: 1px;
                color: white;
            }

            .fr{
                float: right;
                margin-right: 20px;
            }

            .mouses{
                width: 50%;
                margin: 0px auto;
            }
            .mouse{
                width: 20%;
                height: auto;
                text-align: center;
                background-color: #7cd3b1;
                margin: 0px auto;
                float: left;
                cursor: pointer;
            }

            .btnstart{
                clear: both;
                width: 50%;
                height: 60px;
                line-height: 60px;
                background-color: #7cd3b1;
                margin: 0px auto;
                color: white;
                font-size: 20pt;
                text-align: center;
                cursor: pointer;
            }
        </style>


        <script src="../js/jquery-3.3.1.min.js"></script>

        <script>

            var kitnum=0;

            $(function(){
               $("img").addClass("mouse");

               $("img").prop("draggable",false);


               $(".btnstart").click(function(){
                   kitnum=0;
                   $(".time").text("60")

                   //把以前的setInterval全部取消

                   setInterval(function () {
                       var time=parseInt($(".time").text());
                       time--;
                       $(".time").text(time);

                       if(time==0){


                           //setInterval全部取消


                       }
                   },1000);




                   //地鼠出来
                   // setInterval(makemouse???,500);



               });


               $(".mouse").click(function(){
                   //判断地鼠有没有出来
                   // if(){
                      //改变被打图片
                      //计数+1
                      //计数显示
                   // }
               });
            });




            function makemouse(){
                var nums=$(".mouse").length;

                var randomNum=parseInt(Math.random()*(nums));//????????

                //改变地鼠出来的图片
                // $(".mouse").eq(randomNum).????

                // setTimeout(function(){
                //     //改变地鼠回去
                // },level????);
            }

        </script>
    </head>
    <body>

        <div class="dvtime">
            难易程度设置
            <select class="level">
                <option value="5000">简单</option>
                <option value="2000">一般</option>
                <option value="1000">困难</option>
            </select>

            <div class="fr">
                打中<label class="nums">0</label>个
                <label class="time">60</label>秒
            </div>

        </div>

        <div class="mouses">
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
            <img src="../image/dishu2.png"/>
        </div>

        <div class="btnstart">开始游戏</div>

    </body>
</html>